home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / omam_112.arc / SAMPLE.MAM < prev    next >
Text File  |  1987-11-29  |  16KB  |  424 lines

  1. ; This is a sample configuration file for RASMAM -- Roger Alan Smith's
  2. ; Message Area Manager -- how's that for modesty?
  3.  
  4.   --------------------------===-------------------------------------
  5. ; This script probably will NOT run as is.  It's just for reference.
  6.   --------------------------===-------------------------------------
  7.  
  8. ; Comment lines may begin with
  9. ;
  10. ;       . , > @ ^ & * : ; ` ' ~ > < / ? - + = | or \
  11. ;
  12.  
  13. ------------------------------------------------------------------------
  14.  
  15. ; The following psuedo-variables may be used in this file:
  16. ;
  17. ; The names have been changed (since version 1.01).  Sorry about
  18. ; forcing you to edit your old scripts, but this is prettier :-).
  19.  
  20. ;    var.    formerly         becomes
  21.  
  22. ;    #JULIAN#  #J#  --  the current day of the year  (001..366)
  23. ;    #DAY#     #D#  --  the current day of the month (01..31)
  24. ;    #MONTH#   #M#  --  the current month            (01..12)
  25. ;    #YEAR#    #Y#  --  the current year             (87..99)
  26.  
  27. ;    $WEEKDAY$ $D$  --  the current weekday          (SUN..SAT)
  28. ;    $MONTH$   $M$  --  the current month            (JAN..DEC)
  29.  
  30. ;    $SCRIPT$  $C$  --  name of the current MAM configuration file
  31.  
  32. ; New ones (Version 1,02):
  33.  
  34. ;    #HOUR#         -- hour when MAM was run (00..23)
  35. ;    #MINUTE#       -- minute when MAM was run (00..59)
  36. ;    #AREA#         -- number of current message area (00..99)
  37. ;    #user name#    -- user number of specified user (0..???)
  38.  
  39. ;    $PATH$         -- path to current message area
  40. ;    $net/node$     -- Hex string NNNNnnn where NNNN is net and
  41. ;                   --   nnnn is node.  For example,
  42. ;                   --   $366/14$ becomes 016E000E
  43.  
  44. ;    %var%  --  value of specified environment variable
  45.  
  46. ;    %%     --  %
  47. ;    ##     --  #
  48. ;    $$     --  $
  49.  
  50. * You may define your own psuedo-variables (or macros) using the
  51. * DEFINE command.  For example,
  52.  
  53. DEFINE opus c:\opus
  54. DEFINE misc $opus$\misc
  55. DEFINE file $opus$\files
  56. DEFINE arcs $file$\archives
  57. DEFINE custom $opus$
  58.  
  59. * After the above DEFINE statements, you can use $FILE$ anywhere in
  60. * this script and it will be replaced by "C:\OPUS\FILES" or use $ARCS$
  61. * instead of "C:\OPUS\FILES\ARCHIVES" -- it makes your lines much
  62. * shorter and some changes easier.
  63.  
  64. * MAM expands the lines as they are read.  MAM should handle "expanded"
  65. * lines up to about 32000 characters.
  66.  
  67. ------------------------------------------------------------------------
  68. ; The SAVE DEFINITIONS and LOAD DEFINITIONS commands allow you to save
  69. ; and retrieve the values of macros you have defined.  For example,
  70.  
  71. SAVE DEFINITIONS TO $opus$\test.def
  72. LOAD DEFINITIONS FROM $opus$\test2.def
  73.  
  74. ; ....
  75.  
  76. LOAD DEFINITIONS FROM $opus$\test.def
  77.  
  78. ; The LOAD command erases the values of all macros before loading values
  79. ; from the file.
  80. ------------------------------------------------------------------------
  81. ; The INCLUDE command allows you to include another script in the
  82. ; current one.  Warning, including files will slow things down some.
  83.  
  84. ; As an example, the following line will execute a script called
  85. ; INCLUDE.MAM then return to this script.  Note, the filespec should
  86. ; include the drive, path, and extension.
  87.  
  88. INCLUDE C:\OPUS\INCLUDE.MAM
  89.  
  90. ; INCLUDES may be nested up to 10 levels.
  91. ------------------------------------------------------------------------
  92. ; First you must tell MAM where to find some things ...
  93.  
  94. ; The FILE LOG command tells MAM to send log messages to the specified
  95. ; file.  Don't specify OPUS.LOG!
  96.  
  97. FILE LOG $opus$\log\mam.log
  98.  
  99.  
  100. ; The FILE USER command tells MAM the name of your user file.
  101.  
  102. FILE USER $opus$\user.bbs
  103.  
  104.  
  105. ; The PATH SYSTEM command tells MAM where to find your system files.
  106.  
  107. PATH SYSTEM $opus$\
  108.  
  109.  
  110. ; The PATH CUSTOM command tells MAM where to put the ###.BBS files that
  111. ; the WAIT and NOTE commands create.  This will usually be the same as SYSTEM.
  112. ; If the word KEEP is added after the path, then the current custom welcomes
  113. ; will not be deleted.  Don't use KEEP if you're producing message waiting
  114. ; lists.
  115.  
  116. PATH CUSTOM $custom$
  117.  
  118. ; The FILE ECHO command tells MAM the name of your Opus-style Echo control
  119. ; file that MAM uses to look up area numbers and paths.  Opus doesn't seem
  120. ; to get upset if the message area numbers in the Echo control file are
  121. ; wrong, but MAM will!  (Or rather your users will when their last read
  122. ; pointers get screwed up :-).  Oh, and make sure all areas that MAM will
  123. ; operate on are defined in the Echo control file.  Opus doesn't mind if
  124. ; you have areas listed that are not echo areas.
  125.  
  126. FILE ECHO $opus$\nodelist\echo.ctl
  127.  
  128. ------------------------------------------------------------------------
  129.  
  130. ; The LOG command may be put anywhere in the file and will echo the text
  131. ; following the command to the screen (if /TERSE is not used) and to the
  132. ; log file if any.
  133.  
  134. LOG Running MAM $C$
  135.  
  136.  
  137. >>>> The MESSAGES command no longer exists.  Instead, RASMAM will only
  138. >>>> handle messages numbered 1 through 2000.
  139.  
  140. >> The DATE command allows you to tell RASMAM to use the date the message
  141. >> arrived on your system or the date the message was originally written
  142. >> when determining the age of a message.  The default is DATE WRITTEN.
  143.  
  144. DATE ARRIVED
  145.  
  146. ------------------------------------------------------------------------
  147.  
  148. ; The following commands are necessary only if you create custom welcome
  149. ; screens using the WAIT command.
  150.  
  151. > The FILE HEADER command tells MAM the name of a file containing text to
  152. > be placed at the beginning of any ###.BBS files created by the WAIT
  153. > option.  If two files are listed, MAM will use the second if the user has
  154. > ANSI graphics enabled.
  155.  
  156. FILE HEADER $misc$\opuswait.hdr $misc$\graphics.hdr
  157.  
  158.  
  159. > The FORMAT command tells MAM how to format the messages waiting file.
  160. > Currently, three formats are supported.  This first is faster and is the
  161. > default.  New formats will be added later.
  162.  
  163. > Format A is:
  164. >     1  101
  165. >     2  110
  166.  
  167. > Format B is:
  168. >   GENERAL Message Area (1)
  169. >     Message   101 from Roger Smith
  170. >     Message   110 from James Young
  171.  
  172. > Format C is:
  173. >   GENERAL Message Area (1)
  174. >     Message: 101
  175. >     From   : Roger Smith
  176. >     Date   : 01-SEP-87 01:25:47
  177. >     Subject: Re:RASMAM Formats
  178.  
  179. FORMAT B
  180.  
  181. ------------------------------------------------------------------------
  182. ; The IF and END IF commands allow you to conditionally execute portions
  183. ; of your script file.
  184.  
  185. ; The syntax of the IF statement is
  186. ;
  187. ;        IF [@NOT] condition [THEN]
  188. ;
  189. ; where condition is
  190. ;
  191. ;    value1 == value2           true if value1 equals value2
  192. ;    value1 != value2  (or <>)  true if value1 doesn't equal value2
  193. ;    value1 < value2            true if value1 less than value2
  194. ;    value1 > value2            true if value1 greater than value2
  195. ;    value1 <= value2           true if value1 less than or equal to value2
  196. ;    value1 >= value2           true if value1 greater than or equal to value2
  197. ;    value1 IN value2           true if value1 is contained in value2
  198. ;    @EXISTS filespec           true if filespec exists
  199.  
  200. ; Values are all one word (no spaces).  @NOT inverts the result of the
  201. ; condition.
  202.  
  203. IF $MONTH$ == JAN THEN
  204.   LOG It is January.
  205. END IF
  206.  
  207. IF @EXISTS c:\opus\system99.bbs THEN
  208.   IF $WEEKDAY$ IN TUETHU THEN
  209.     LOG It is Tuesday or Thursday == $WEEKDAY$ == and SYSTEM99.BBS exists
  210.   END IF
  211.   IF $MONTH$ <> JAN THEN
  212.     LOG System99.BBS exists, but the month is not January
  213.   END IF
  214. END IF
  215.  
  216. IF @NOT $MONTH$#Y# == JAN87
  217.   LOG It is NOT January 1987
  218. END IF
  219. ------------------------------------------------------------------------
  220. ; ERASE deletes the specified file or files.
  221.  
  222. ERASE $custom$\*.XXX
  223. ------------------------------------------------------------------------
  224. ; LOCK makes any following WAITs ignore the specified user (or class of
  225. ; user by privilege).  For example,
  226.  
  227. LOCK Ben-z Lawrence
  228.  
  229. ; will stop message waiting lists from being made for Ben-z Lawrence
  230. ; until an "UNLOCK Ben-z Lawrence" or "UNLOCK priv" (where priv is
  231. ; Ben's privilege level.
  232.  
  233. ; UNLOCK reverses the effects of a LOCK
  234.  
  235. ; For example, the following will re-enable checking of messages waiting
  236. ; for all users with SYSOP priv's:
  237.  
  238. UNLOCK Sysop
  239.  
  240. ------------------------------------------------------------------------
  241. ; In the next section you must tell MAM what to do in each message area.
  242. ; Message paths are used so that you may rearrange message area numbers
  243. ; without having to change your MAM file.
  244.  
  245. ; Use the AREA command to define the area for the commands.  Add the
  246. ; word ECHO after the name if the area is an echomail area.  The area
  247. ; name must match the area name from your echo control file.
  248.  
  249. AREA general echo
  250.  
  251.  
  252. ; The WAIT command tells MAM to create message waiting files like OpusWait.
  253. ; These are "custom welcomes" that are displayed when the user logs on.
  254.  
  255. WAIT
  256.  
  257.  
  258. ; The RENUM command has the following syntax:
  259. ;
  260. ;     RENUM [SUBJECT] [CHAIN]
  261. ;
  262. ; The RENUM command tells MAM to renumber the messages. If you add the
  263. ; word SUBJECT after the RENUM command, MAM will build a reply chain based
  264. ; on the message subjects.  This restores the reply chain which is lost in
  265. ; echomail conferences.  The keyword CHAIN does the same thing as SUBJECT,
  266. ; but the last message in each subject chain points to the first message in
  267. ; the next subject chain.  This provides a "threaded read" function like
  268. ; the one available on other BBS systems.  Just use the "+" and "-" instead
  269. ; of "N" and "P" to read messages.
  270.  
  271. RENUM CHAIN
  272.  
  273.  
  274. ; The KILL command has the following syntax:
  275. ;
  276. ;    KILL [WHEN ll] [RECEIVED] [DAYS mm] [KEEP nn] [SKIP oo] [PRIVATE]
  277. ;
  278. ; The WHEN option specifies that the KILL command should execute only when
  279. ; there are more than ll messages in the area.  The RECEIVED option causes
  280. ; only received messages to be deleted.  The DAYS option allows you to specify
  281. ; that only messages older than mm days be killed.  The KEEP option specifies
  282. ; that the first nn messages in the area will not be killed. The private
  283. ; option specifies that the command will work only on private messages.
  284.  
  285. ! SKIP oo tells MAM not to delete the first oo messages in the area.
  286.  
  287. ; Here are some samples:
  288. ;
  289. ; To kill all received messages in the area:
  290. ;    KILL RECEIVED
  291. ; To kill all messages over 90 days old except the first 10:
  292. ;    KILL DAYS 90 SKIP 10
  293. ; To kill all messages over 30 days old keeping at least 10:
  294. ;    KILL DAYS 30 KEEP 10
  295. ; To kill all received messages over 30 days old:
  296. ;    KILL RECEIVED DAYS 30
  297. ; To kill all received messages AND all over 30 days old: (use two commands!)
  298. ;    KILL RECEIVED
  299. ;    KILL DAYS 30
  300. ; To kill all private messages that have been received:
  301. ;    KILL RECEIVED PRIVATE
  302.  
  303. ; The KILL command can do things many different ways.  You may wish to backup
  304. ; all your messages to a temporary directory before testing your KILL
  305. ; command(s). 
  306.  
  307. ; The ARCHIVE command is similar to kill except the messages are copied to
  308. ; a text file before being deleted.  The syntax is:
  309. ;
  310. ;  ARCHIVE [RECEIVED] [DAYS mm] [KEEP nn] [SKIP oo] [PRIVATE] TO file
  311. ;
  312. ; The RECEIVED, DAYS, KEEP, SKIP, and PRIVATE options work just like kill.
  313. ; The TO clause tells MAM what file to create to hold the text of the messages.
  314.  
  315. ; Here's the ARCHIVE command I use for my General Message area:
  316.  
  317. ARCHIVE KEEP 75 TO $arcs$\chat#Y#.$M$
  318.  
  319. ; This will keep about 100 messages in the area at any time.  When
  320. ; there are 100 or more messages in the area, then MAM will pull the lowest
  321. ; numbered messages (skipping 1 since this is an echo area) and put them
  322. ; in a file called CHAT##.@@@ where ## is the year and @@@ is the month.
  323. ; The file is put in the file area where my archives are located.  At the
  324. ; end of this month, $M$ will change to the next month and a new file
  325. ; will be used.
  326.  
  327. ; Note:  You can use more than one ARCHIVE command.  RENUM and WAIT are
  328. ; always executed last, after any number of ARCHIVE and KILL commands have
  329. ; been executed.  The ARCHIVE and KILL commands will be executed in the order
  330. ; they appear in the script.  (ARCHIVE and KILL commands may be mixed).
  331. ; For example, you could ARCHIVE all messages over 30 days old then KILL all
  332. ; received messages over 15 days old.  The combinations are infinite.  Again,
  333. ; you may wish to copy messages into a temporary directory to test your MAM
  334. ; file.
  335.  
  336. ; The END AREA statement marks the end of processing for the current
  337. ; area.
  338.  
  339. END AREA
  340.  
  341. ------------------------------------------------------------------------
  342.  
  343. ; The AREA command and its WAIT, RENUM, KILL, and ARCHIVE commands should
  344. ; be repeated for each area you wish to process.
  345.  
  346. AREA records ECHO
  347.   WAIT
  348.   RENUM CHAIN
  349.   ARCHIVE KEEP 150 TO $arcs$\music#Y#.$M$
  350. END AREA
  351.  
  352. ------------------------------------------------------------------------
  353.  
  354. ; The following commands must be executed after the last area has been
  355. ; processed.
  356.  
  357.  
  358. > The FILE TRAILER command tells MAM the name of a file containing text to
  359. > be appended to each ###.BBS file that exists.  The trailer files are
  360. > added to the custom welcomes when the FILE TRAILER statement is
  361. > encountered in the script.  If you wish to put the trailer after any
  362. > NOTEs, then put the FILE TRAILER statement at the end of the script.
  363.  
  364. FILE TRAILER $misc$\opuswait.trl
  365.  
  366. ; The NOTE command allows you to add a note to a custom welcome screen
  367. ; for a certain user (or group of users).  NOTE PREFIX adds the note
  368. ; before any text entered in the custom welcome screen by the WAIT command.
  369. ; NOTE SUFFIX adds the file to the end of the custom welcome.
  370.  
  371. ; The syntax for NOTE is:
  372. ;  NOTE {PREFIX|SUFFIX} filename TO {{username|priv}, ...}
  373. ;
  374. ; Priv is a privilege level -- TWIT, DISGRACE, NORMAL, PRIV, EXTRA, ASSIST,
  375. ; or SYSOP.
  376.  
  377. ; The following will send the file TWIT.TXT to all twits.
  378.  
  379. NOTE SUFFIX $misc$\twit.txt TO TWIT
  380.  
  381. ; The follow sends a message to a certain user:
  382.  
  383. NOTE SUFFIX $opus$\notes\friends.txt TO David Hicks
  384.  
  385. ; The DELETE command deletes any custom welcome intended for the specified
  386. ; user(s).  If someone who calls your board participates in one of your
  387. ; echomail conferences on a different system, he may have a long list of
  388. ; messages waiting even though he's seen them on his board.  You can use
  389. ; DELETE to delete the welcome screen for that caller.  If you have entered
  390. ; "ALL" in your user list, you should delete the messages waiting for ALL.
  391.  
  392. ; DELETE will also delete custom welcomes waiting for a class of user.
  393. ; For example, DELETE SYSOP will remove all messages waiting for users
  394. ; with SYSOP priv's.
  395.  
  396. DELETE Ben-z Lawrence
  397. DELETE All
  398.  
  399. ; To delete a custom welcome waiting for a user called "SYSOP" use:
  400.  
  401. ERASE $custom$\#sysop#.BBS
  402.  
  403. ; where $custom$ is the path to your custom welcomes.
  404. --------------------------------------------------------------------
  405.  
  406. ; The ADD command concatenates two files.
  407. ; The syntax is:
  408. ;
  409. ;   ADD file1 TO file2 GIVING file3
  410. ;
  411. ; File1 and File2 are added and written to File3.  File3 is overwritten.
  412. ; No errors are generated if File1 or File2 is missing or if File3 is the
  413. ; same as File1 or File2.  The files must be text files.
  414.  
  415. ADD $misc$\bull1.bbs TO $misc$\bulletin.bbs GIVING $misc$\bulletin.bbs
  416. ------------------------------------------------------------------------
  417. ; The SHELL command executes a DOS command.  This requires DOS 3.1 or
  418. ; higher.
  419.  
  420. SHELL dir $misc$
  421.  
  422.  
  423.